package com.mmw.ruiji.server.impl;

import com.mmw.ruiji.mapper.EmployeeMapper;
import com.mmw.ruiji.entity.Employee;
import com.mmw.ruiji.server.EmployeeServer;
import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServerImpl implements EmployeeServer {

    @Autowired
    EmployeeMapper employeeMapper;
    @Override
    public List<Employee> getEmployees() {
        return employeeMapper.getEmployees();
    }

    @Override
    public Integer addEmployee(Employee employee) {
        int i = employeeMapper.addEmployee(employee);
        return i;
    }

    @Override
    public Integer deleteEmployee(Integer id) {
        return employeeMapper.deleteEmployee(id);
    }
}
